/*****************************************************************************
 * IOwlParser.cs
 * 
 * Copyright (c) 2005, Bram Pellens.
 *  
 * This file is part of the OwlDotNetApi.
 * The OwlDotNetApi is free software; you can redistribute it and/or 
 * modify it under the terms of the GNU Lesser General Public License as published 
 * by the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * The OwlDotNetApi is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with the OwlDotNetApi; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 * 
 * Author: 
 * 
 * Bram Pellens
 * bpellens@gmail.com
 ******************************************************************************/

using System;
using System.Collections;
using System.IO;

namespace OwlDotNetApi
{
	/// <summary>
	/// Represents an OWL Parser
	/// </summary>
	public interface IOwlParser
	{
		/// <summary>
		/// Indicates whether the parser should throw an exception and stop when it encounters an error
		/// </summary>
		bool StopOnErrors
		{
			get;
			set;
		}
		
		/// <summary>
		/// Indicates whether the parser should throw an exception and stop when it encounters a warning
		/// </summary>
		bool StopOnWarnings
		{
			get;
			set;
		}

		/// <summary>
		/// Represents a list of warning messages generated by the parser
		/// </summary>
		ArrayList Warnings
		{
			get;
		}

		/// <summary>
		/// Represents a list of error messages generated by the parser
		/// </summary>
		ArrayList Errors
		{
			get;
		}

		/// <summary>
		/// Represents a list of logging messages
		/// </summary>
		ArrayList Messages
		{
			get;
		}

		/// <summary>
		/// When implemented by a class, parses the OWL at the given URI, into an existing graph
		/// </summary>
		/// <param name="uri">The Uri of the document to parse</param>
		/// <param name="graph">An object that implements the IOwlGraph interface that will be used as the destination graph</param>
		/// <returns>An object that implements the IOwlGraph interface</returns>
		IOwlGraph ParseOwl(string uri, IOwlGraph graph);

		/// <summary>
		/// When implemented by a class, parses the OWL at the given URI
		/// </summary>
		/// <param name="uri">The Uri of the document to parse</param>
		/// <returns>An object that implements the IOwlGraph interface</returns>
		IOwlGraph ParseOwl(string uri);

		/// <summary>
		/// When implemented by a class, parses the OWL at the given URI, into an existing graph
		/// </summary>
		/// <param name="uri">The Uri of the document to parse</param>
		/// <param name="graph">An object that implements the IOwlGraph interface that will be used as the destination graph</param>
		/// <returns>An object that implements the IOwlGraph interface</returns>
		IOwlGraph ParseOwl(Uri uri, IOwlGraph graph);

		/// <summary>
		/// When implemented by a class, parses the OWL at the given URI
		/// </summary>
		/// <param name="uri">The Uri of the document to parse</param>
		/// <returns>An object that implements the IOwlGraph interface</returns>
		IOwlGraph ParseOwl(Uri uri);

		/// <summary>
		/// When implemented by a class, parses the OWL from a stream into an existing Graph
		/// </summary>
		/// <param name="inStream">The input stream for data</param>
		/// <param name="graph">An object that implements the IOwlGraph interface that will be used as the destination graph</param>
		/// <returns>An object that implements the IOwlGraph interface</returns>
		IOwlGraph ParseOwl(Stream inStream, IOwlGraph graph);

		/// <summary>
		/// When implemented by a class, parses the OWL from a stream
		/// </summary>
		/// <param name="inStream">The input stream for data</param>
		/// <returns>An object that implements the IOwlGraph interface</returns>
		IOwlGraph ParseOwl(Stream inStream);
	}
}
